﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Lite;
using Lite.Caching;
using KylinstarMahjong.Operations;
using Photon.SocketServer;
namespace KylinstarMahjongServer
{
    class MahjongRoom : Lite.LiteGame
    {
        public MahjongRoom(string gameName, RoomCacheBase roomCache) 
            : base( gameName,  roomCache)
        {
        }

        protected override void ExecuteOperation(LitePeer peer, OperationRequest operationRequest, SendParameters sendParameters)
        {
            switch ((MyOperationCodes)operationRequest.OperationCode)
            {
                case MyOperationCodes.GameOperation:
                    this.HandleMahjongOperation(peer, operationRequest, sendParameters);
                    break;

                default:
                    // all other operations will be handled by the LiteGame implementation
                    base.ExecuteOperation(peer, operationRequest, sendParameters);
                    break;
            }
        }

        private void HandleMahjongOperation(LitePeer peer, OperationRequest operationRequest, SendParameters sendParameters)
        {

        }
    }
}





   